/*
 *	workmanager.h
 *	© 2009 Tom Booth
 *
 *	A work manager for a set of worker threads
 *
 */

#ifndef WORKMANAGER_HEADER
#define WORKMANAGER_HEADER

#include <pthread.h>


// thread condition to alert works that there are more jobs
pthread_cond_t wm_more_jobs;
pthread_mutex_t wm_more_jobs_mutex;

void wm_init_manager(void);
void wm_destroy_manager(void);

void wm_add_item(char *payload);

char* wm_get_item(void);

int wm_item_avaliable();


#endif